package org.dinnermate.food;

import java.sql.SQLException;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.ManyToMany;
import net.java.ao.OneToMany;
import net.java.ao.Preload;
import net.java.ao.schema.TableName;

import org.dinnermate.db.MapClass;
import org.dinnermate.menu.MenuItem;

@TableName("Ingredient")
@Implementation(IngredientImpl.class)
@MapClass(MenuItemIngredient.class)
@Preload()
public interface Ingredient extends Entity
{
	public String getName();

	public void setName( String name );

	public float getQuantity();

	public void setQuantity( float quantity );
	
	public float getPrice();
	
	public void setPrice( float price );

	public String getUnit();

	public void setUnit( String unit );

	public String getNotes();

	public void setNotes( String notes );
	
	@OneToMany
	public MenuItemIngredient[] getMenuItemIngredient();
	
	@ManyToMany(MenuItemIngredient.class)
	public MenuItem[] getMenuItems();
	
	public String toString();
	
	public void deleteMaps() throws SQLException;
}
